package cn.tedu.demo05wangaoshong.demo;

import org.springframework.context.annotation.AnnotationConfigApplicationContext;

public class DemoTest {
    public static void main(String[] args) {
        //初始化Spring容器
        AnnotationConfigApplicationContext acac =
                new AnnotationConfigApplicationContext(Config.class);
        //获得Spring容器中保存的对象
        //getBean([对象额度名称/id],[对象的类型.class])
      Stu stu = acac.getBean("stu",Stu.class);
        System.out.println(stu);
    }
}
